/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package Server.domain.items;

import Server.domain.GameLevel;
import Server.domain.Player;
import java.util.ArrayList;
import java.util.List;

/**
 *
 * @author Ripper
 */
public class Shield extends Weapon
{
    public Shield(String itemName, int itemCost, int looktype, int defenseValue, int magicArmorValue, boolean twoHanded, List<ItemAttribute> attributes)
    {
        super(itemName, itemCost, looktype, 0, defenseValue, magicArmorValue, twoHanded, attributes);
        
        
    }

    @Override
    public Item copyItem()
    {
        List<ItemAttribute> attribs = new ArrayList<ItemAttribute>();
        for(ItemAttribute ia: getEquipmentAttributes())
        {
            attribs.add(new ItemAttribute(ia.getAttribute(), ia.getAttributeValue()));
        }
        
        Shield i = new Shield(getItemName(), getItemCost(), getLooktype(), getArmorValue(), getMagicArmorValue(), isTwoHandedWeapon(), attribs);
        return i;
    }
    @Override
    public void specificAttack(GameLevel gl, Player parent) 
    {
        //a shield is never used as a weapon.
    }
    @Override
    public String getItemType()
    {
        return "shield";
    }
}
